<template>
  <div id="app">
    <Category title="游戏">
      <template scope="mimi"
        ><!-- scope可以换为slot-scope效果一样 -->
        <ul>
          <li v-for="(item, index) in mimi.slotData" :key="index">
            {{ item }}
          </li>
        </ul>
      </template>
    </Category>
    <Category title="游戏">
      <template scope="mimi">
        <ol>
          <li v-for="(item, index) in mimi.slotData" :key="index">
            {{ item }}
          </li>
        </ol>
        <h4>{{ mimi.msg }}</h4>
      </template>
    </Category>
    <Category title="游戏">
      <template scope="{slotData,msg}"
        ><!-- 对象的解构赋值也可以 -->
        <h4 v-for="(item, index) in slotData" :key="index">{{ item }}</h4>
        <h4>{{ msg }}</h4>
      </template>
    </Category>
  </div>
</template>
<script>
import Category from "./components/Category.vue";
export default {
  name: "App",
  components: {
    Category,
  },
};
</script>
<style>
* {
  padding: 0;
  margin: 0;
}

#app {
  display: flex;
  justify-content: space-around;
}
image {
  width: 100%;
}
.movie {
  display: flex;
  justify-content: space-around;
}
h4 {
  text-align: center;
}
</style>

